package com.miraclesea.framework.entity;

import javax.persistence.MappedSuperclass;
import javax.persistence.Version;

import lombok.Getter;
import lombok.Setter;

import org.springframework.data.jpa.domain.AbstractAuditable;

@MappedSuperclass
@Getter
@Setter
public abstract class AbstractOptimisticLockAuditable<U> extends AbstractAuditable<U, Long> {

	private static final long serialVersionUID = -5665876775256923163L;
	
	@Version
	private long version;
	
	@Override
	public final void setId(final Long id) {
		super.setId(id);
	}
}
